package com.security;

public class SecurityFactory {

    /**
     * 获取安全对象
     * @return 安全对象实例
     */
    public static Securitiable getSecurityObject(){
        Securitiable securitiable = null;
        String type = ConfigUtil.getInstance().get("type");
        switch(SecurityEnum.valueOf(type)) {
            case AES:
                securitiable = AesImpl.getInstance();
                break;
            default:
                securitiable = AesImpl.getInstance();
                break;
        }
        return securitiable;
    }

}
